<template>
    <div id="box"></div>
    <img :src="imgsrc">
    <img src="~img/logo.png">
</template>

<script>
import { reactive, toRefs } from 'vue'

export default {
    setup () {
        const state = reactive({
            msg: 'Hello Vue1 World!',
            imgsrc: require('img/logo.png')
        })
    
        return {
            ...toRefs(state)
        }
    }
}
</script>

<style scoped>
#box{
    height:100px;
    width:100px;
    background: url('~img/logo.png');
}
</style>